﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;

public partial class peorder : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
      
    }
    double total, Lable1, Lable2, Lable3, Lable4, Lable5, Lable6, Lable7, Lable8;

    protected void Button1_Click1(object sender, EventArgs e)
    {


        double total = 0;
        Label11.Text = "";
        if (CheckBox1.Checked)
        {

            Lable1 = double.Parse(CheckBox1.Text) * double.Parse(DropDownList1.Text);

            Label11.Text = Lable1.ToString();
        }

        if (CheckBox2.Checked)
        {
            Lable2 = double.Parse(CheckBox2.Text) * double.Parse(DropDownList2.Text);
            total = Lable1 + Lable2;
            Label11.Text = total.ToString();
        }

        if (CheckBox3.Checked)
        {
            Lable3 = double.Parse(CheckBox3.Text) * double.Parse(DropDownList3.Text);
            total = Lable1 + Lable2 + Lable3;
            Label11.Text = total.ToString();
        }


        if (CheckBox4.Checked)
        {
            Lable4 = double.Parse(CheckBox4.Text) * double.Parse(DropDownList4.Text);
            total = Lable1 + Lable2 + Lable3 + Lable4;
            Label11.Text = total.ToString();
        }

        if (CheckBox5.Checked)
        {
            Lable5 = double.Parse(CheckBox5.Text) * double.Parse(DropDownList5.Text);
            total = Lable1 + Lable2 + Lable3 + Lable4 + Lable5;
            Label11.Text = total.ToString();
        }

        if (CheckBox6.Checked)
        {
            Lable6 = double.Parse(CheckBox6.Text) * double.Parse(DropDownList6.Text);
            total = Lable1 + Lable2 + Lable3 + Lable4 + Lable5 + Lable6;
            Label11.Text = total.ToString();
        }

        if (CheckBox7.Checked)
        {
            Lable7 = double.Parse(CheckBox7.Text) * double.Parse(DropDownList7.Text);
            total = Lable1 + Lable2 + Lable3 + Lable4 + Lable5 + Lable6 + Lable7;
            Label11.Text = total.ToString();
        }

        if (CheckBox8.Checked)
        {
            Lable8 = double.Parse(CheckBox8.Text) * double.Parse(DropDownList8.Text);
            total = Lable1 + Lable2 + Lable3 + Lable4 + Lable5 + Lable6 + Lable7 + Lable8;
            Label11.Text = total.ToString();
        }

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        if (Label11.Text == "")
        {
            Label12.Text = "please select you Product";
        }
        else
        {
            Response.Redirect("payment.aspx?Total=" + Server.UrlEncode(Label11.Text));
        }
    }
}
